package com.shoppingCart.service;

import com.shoppingCart.dataobject.Customer;
import com.shoppingCart.mapper.CustomerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * create By lihao
 */
@Service
public class CustomerService {

    @Autowired
    CustomerMapper customerMapper;

    public Customer findUserByOpenId(String openId){
        return customerMapper.findUserByOpenId(openId);
    }

    public Customer findUserByUserId(String userId){
        return customerMapper.findUserByOpenId(userId);
    }

    public boolean insertUser(Customer customer){
        return customerMapper.insertUser(customer);
    }

}
